package com.greenold.Recharge.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.greenold.Recharge.mapper.RechargeMapper;
import com.greenold.Recharge.domain.Recharge;
import com.greenold.Recharge.service.IRechargeService;

/**
 * 预交费充值Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-13
 */
@Service
public class RechargeServiceImpl implements IRechargeService 
{
    @Autowired
    private RechargeMapper rechargeMapper;
    /**
     * 根据老人id查询床位
     */
    @Override
    public String selectBedNoByElderId(String elderId)
    {
        return rechargeMapper.selectBedNoByElderId(elderId);
    }
    /**
     * 查询预交费充值
     * 
     * @param id 预交费充值主键
     * @return 预交费充值
     */
    @Override
    public Recharge selectRechargeById(String id)
    {
        return rechargeMapper.selectRechargeById(id);
    }

    /**
     * 查询预交费充值列表
     * 
     * @param recharge 预交费充值
     * @return 预交费充值
     */
    @Override
    public List<Recharge> selectRechargeList(Recharge recharge)
    {
        return rechargeMapper.selectRechargeList(recharge);
    }

    /**
     * 新增预交费充值
     * 
     * @param recharge 预交费充值
     * @return 结果
     */
    @Override
    public int insertRecharge(Recharge recharge)
    {
        return rechargeMapper.insertRecharge(recharge);
    }

    /**
     * 修改预交费充值
     * 
     * @param recharge 预交费充值
     * @return 结果
     */
    @Override
    public int updateRecharge(Recharge recharge)
    {
        return rechargeMapper.updateRecharge(recharge);
    }

    /**
     * 批量删除预交费充值
     * 
     * @param ids 需要删除的预交费充值主键
     * @return 结果
     */
    @Override
    public int deleteRechargeByIds(String[] ids)
    {
        return rechargeMapper.deleteRechargeByIds(ids);
    }

    /**
     * 删除预交费充值信息
     * 
     * @param id 预交费充值主键
     * @return 结果
     */
    @Override
    public int deleteRechargeById(String id)
    {
        return rechargeMapper.deleteRechargeById(id);
    }
}
